<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>E[attribute~=value]选择器</title>
    <style>
        [class~=a]{
            font-size: 36px;
            color:green;
        }
    </style>
</head>
<body>
    <p class="a">《赤 壁》</p>
    <p class="a b">杜牧</p>
    <p class="a-b">折戟沉沙铁未销，自将磨洗认前朝。东风不与周郎便，铜雀春深锁二乔。</p>
</body>
</html>